{extend name="public/base" /}
{block name="body"}
<div class="layui-fluid">
	<div class="layui-row">
		<div class="layui-col-md12 layui-col-xs12">
			<div class="widget-head">
				<div class="widget-title">订单详情</div>
			</div>
			<div class="widget__order-detail widget-body layui-col-sm12 layui-col-md12 layui-col-lg12">
				<div class="layui-col-sm12">
					<ul class="order-detail-progress progress-{$progress}">
						<li>
							<span>下单时间</span>
							<div class="tip">
								{$info.create_time}
							</div>
						</li>
						<li>
							<span>付款</span>
							{eq name="info.pay_status" value="1"}
							<div class="tip">
								{$info.pay_time|format_time}
							</div>
							{/eq}
						</li>
						<li>
							<span>发货</span>
							{eq name="info.shipping_status" value="1"}
							<div class="tip">
								{$info.consign_time|format_time}
							</div>
							{/eq}
						</li>
						<li>
							<span>完成</span>
							{eq name="info.order_status" value="1"}
							<div class="tip">
								{$info.finish_time|format_time}
							</div>
							{/eq}
						</li>
					</ul>
				</div>
				<div class="widget-head">
					<div class="widget-title">基本信息</div>
				</div>
				<div class="widget-body layui-col-md12 layui-col-xs12">
					<table class="layui-table layui-form">
						<thead>
							<tr>
								<th>订单号</th>
								<th>买家</th>
								<th>订单金额</th>
								<th>交易状态</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>{$info.order_no}</td>
								<td>
									<p>{$info.member.nickname}</p>
									<p class="layer-link-muted">(会员ID:{$info.member.id})</p>
								</td>
								<td>
									<p>订单总额：￥{$info.order_money}</p>
									{if ($info['coupon_id'] > 0)}
									<p>优惠抵扣：￥{$info.coupon_money}</p>
									{/if}
									<p>运费金额：￥{$info.shipping_money}</p>
									<p>实付金额：<span class="x-color-red">￥{$info.pay_money}</span></p>				
								</td>
								<td>
									<p>付款状态：
									{eq name="info.pay_status" value="1"}
									<span class="layer-badge layer-badge-success">已付款</span>
									{else/}
									<span class="layer-badge">未付款</span>
									{/eq}
									</p>
									<p>发货状态：
									{eq name="info.shipping_status" value="1"}
									<span class="layer-badge layer-badge-success">已发货</span>
									{else/}
									<span class="layer-badge">未发货</span>
									{/eq}									
									</p>
									{neq name="info.order_status" value="0"}
									<p>订单状态：
									{switch info.order_status}
										{case -1}
    										<span class="layer-badge">已取消</span>
    									{/case}
										{case 1}
											<span class="layui-badge layui-bg-green">已完成</span>
										{/case}
    									{case 2}
    										<span class="layui-badge layui-bg-blue">已评价</span>
    									{/case}
									{/switch}
									</p>	
									{/neq}									
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="widget-head">
					<div class="widget-title">商品信息</div>
				</div>
				<div class="widget-body layui-col-md12 layui-col-xs12">
					<table class="layui-table layui-form">
						<thead>
							<tr>
								<th>商品名称</th>
								<th>单价</th>
								<th>购买数量</th>
								<th>商品总价</th>
							</tr>
						</thead>
						<tbody>
							{volist name="goods" id="vo"}
							<tr>
								<td class="goods-detail layer-text-middle">
									<div class="goods-image">
										<img src="{$vo.goods_image}" alt="">
									</div>
									<div class="goods-info">
										<p class="goods-title">{$vo.goods_name}</p>
										<p class="goods-spec layer-link-muted">{$vo.sku_name}</p>
									</div>
								</td>
								<td>￥{$vo.goods_money}</td>
								<td>×{$vo.num}</td>
								<td>￥{$vo.price}</td>
							</tr>
							{/volist}
							<tr>
								<td colspan="6" class="layer-text-right ">
									<span class="">买家留言：{$info['remark'] ? '' : '无'}</span>
									<span class="layer-fr">总计金额：￥{$info['order_money']}</span>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="widget-head">
					<div class="widget-title">收货信息</div>
				</div>
				<div class="widget-body layui-col-md12 layui-col-xs12">
					<table class="layui-table layui-form">
						<thead>
							<tr>
								<th>收货人</th>
								<th>收货电话</th>
								<th>收货地址</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>{$info.realname}</td>
								<td>{$info.mobile}</td>
								<td>{$info.address}</td>
							</tr>
						</tbody>
					</table>
				</div>
				{eq name="info.pay_status" value="1"}
				<div class="widget-head">
					<div class="widget-title">付款信息</div>
				</div>
				<div class="widget-body layui-col-md12 layui-col-xs12">
					<table class="layui-table layui-form">
						<thead>
							<tr>
								<th>应付金额</th>
								<th>支付方式</th>
								<th>支付流水号</th>
								<th>付款状态</th>
								<th>付款时间</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>{$info.pay_money}</td>
								<td>{eq name="info.pay_type" value="0")}微信支付{else/}支付宝{/eq}</td>
								<td>{$info.out_trade_no}</td>
								<td>{eq name="info.pay_status" value="0"}未付款{else/}已付款{/eq}</td>
								<td>{$info.pay_time}</td>
							</tr>
						</tbody>
					</table>
				</div>
				{/eq}
				{eq name="info.shipping_status" value="1"}
				<div class="widget-head">
					<div class="widget-title">物流信息</div>
				</div>
				<div class="widget-body layui-col-md12 layui-col-xs12">
					<table class="layui-table layui-form">
						<thead>
							<tr>
								<th>物流公司</th>
								<th>物流单号</th>
								<th>发货时间</th>
							</tr>
						</thead>
						<tbody>
							{volist name="express" id="vo"}
							<tr>
								<td>{$vo.company}</td>
								<td>{$vo.express_no}</td>
								<td>{$vo.create_time}</td>
							</tr>
							{/volist}
						</tbody>
					</table>
				</div>
				{/eq}			
			</div>
		</div>
	</div>
</div>
{/block}  